package org.fastiot

/**
 * 支持终端按型号细分，深度定制信息和策略
 */
class Model {

    static mapWith = "mongo"

    String code
    String name

    /**
     * Customized Contents
     * 自定义内容，针对不同领域场景下，各种终端设备的静态信息定制。
     */
    Map<String, Serializable> customizations
    static embedded = ['customizations']

    Date dateCreated
    Date lastUpdated

    static constraints = {
        code(blank: false, unique: true)
        name(blank: false, unique: true)
        customizations(nullable: true)
        dateCreated()
        lastUpdated()
    }
}
